// app/model/patient.js
// 病人表，存储病人的相应信息
'use strict';

module.exports = app => {
  const {
    STRING,
    INTEGER,
    DATE,
  } = app.Sequelize;

  const Patient = app.model.define('patient', {
    // 病人ID 
    id_patient: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    // 病人名字
    name_patient: STRING,
    // 病人身份证
    identity_patient: STRING,
    sex_patient: STRING,//病人性别
    birth_patient: DATE,//病人生日
    age_patient: STRING,//病人年龄
    height_patient: STRING,//病人身高
    weight_patient: STRING,//病人体重
    phone_patient: STRING,//病人手机
  }, {
    freezeTableName: true,
    timestamps: false,
  });

  return Patient;
};

